\section{user\_\-handler::ic\_\-acceptor Class Reference}
\label{classuser__handler_1_1ic__acceptor}\index{user_handler::ic_acceptor@{user\_\-handler::ic\_\-acceptor}}
This class is a acceptor for the microcontroller.  


{\tt \#include $<$ic\_\-acceptor.h$>$}

Inheritance diagram for user\_\-handler::ic\_\-acceptor::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3cm]{classuser__handler_1_1ic__acceptor}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\bf{ic\_\-acceptor} (boost::shared\_\-ptr$<$ \bf{network::i\_\-socket} $>$ ic, boost::shared\_\-ptr$<$ \bf{network::i\_\-socket} $>$ web\_\-sock, boost::weak\_\-ptr$<$ \bf{handler::multicaster} $>$ mul, boost::shared\_\-ptr$<$ \bf{network::connection\_\-manager} $>$ mgr)
\begin{CompactList}\small\item\em \doxyref{ic\_\-acceptor}{p.}{classuser__handler_1_1ic__acceptor} creates a new \doxyref{ic\_\-acceptor}{p.}{classuser__handler_1_1ic__acceptor} \item\end{CompactList}\item 
virtual \bf{$\sim$ic\_\-acceptor} ()\label{classuser__handler_1_1ic__acceptor_7800d4b0f3fee488ff1900ee9bde0a77}

\item 
virtual void \bf{handle\_\-event} (boost::shared\_\-ptr$<$ \bf{network::message} $>$ n)
\begin{CompactList}\small\item\em handle\_\-event handles all events concerning this class. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
This class is a acceptor for the microcontroller. 

This class is a acceptor for the microcontroller. It creates a new \doxyref{ic\_\-handler}{p.}{classuser__handler_1_1ic__handler} every time a new connection from a webserver is established. 



Definition at line 42 of file ic\_\-acceptor.h.

\subsection{Constructor \& Destructor Documentation}
\index{user_handler::ic_acceptor@{user\_\-handler::ic\_\-acceptor}!ic_acceptor@{ic\_\-acceptor}}
\index{ic_acceptor@{ic\_\-acceptor}!user_handler::ic_acceptor@{user\_\-handler::ic\_\-acceptor}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}user\_\-handler::ic\_\-acceptor::ic\_\-acceptor (boost::shared\_\-ptr$<$ \bf{network::i\_\-socket} $>$ {\em ic}, boost::shared\_\-ptr$<$ \bf{network::i\_\-socket} $>$ {\em web\_\-sock}, boost::weak\_\-ptr$<$ \bf{handler::multicaster} $>$ {\em mul}, boost::shared\_\-ptr$<$ \bf{network::connection\_\-manager} $>$ {\em mgr})\hspace{0.3cm}{\tt  [inline]}}\label{classuser__handler_1_1ic__acceptor_d502a219f1e444484813a020799ae73d}


\doxyref{ic\_\-acceptor}{p.}{classuser__handler_1_1ic__acceptor} creates a new \doxyref{ic\_\-acceptor}{p.}{classuser__handler_1_1ic__acceptor} 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ic}]is the socket to the microcontroller \item[{\em web\_\-sock}]is the socket to the web-listener \item[{\em mul}]is a shared\_\-ptr to the multicaster-object \item[{\em mgr}]is a shared\_\-ptr to the connection\_\-manager-object \end{description}
\end{Desc}


Definition at line 52 of file ic\_\-acceptor.h.

\begin{Code}\begin{verbatim}56                 : _ic(ic), _web(web_sock), _multi(mul), _mgr(mgr)
57                 {}
\end{verbatim}\end{Code}




\subsection{Member Function Documentation}
\index{user_handler::ic_acceptor@{user\_\-handler::ic\_\-acceptor}!handle_event@{handle\_\-event}}
\index{handle_event@{handle\_\-event}!user_handler::ic_acceptor@{user\_\-handler::ic\_\-acceptor}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void user\_\-handler::ic\_\-acceptor::handle\_\-event (boost::shared\_\-ptr$<$ \bf{network::message} $>$ {\em n})\hspace{0.3cm}{\tt  [virtual]}}\label{classuser__handler_1_1ic__acceptor_0d3788cbda0fbd9f66ec5a48146de781}


handle\_\-event handles all events concerning this class. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em n}]is the received message from the message\_\-queue. \end{description}
\end{Desc}


Implements \bf{handler::event\_\-handler} \doxyref{p.}{classhandler_1_1event__handler_7ff75131a32fb17cf4addc4581344bff}.

Definition at line 3 of file ic\_\-acceptor.cpp.

\begin{Code}\begin{verbatim}5 {
6         // creating the handler...
7         if(n->type == network::CONNECT) {
8                 boost::shared_ptr<user_handler::ic_handler> h(
9                         user_handler::ic_handler::create(
10                                 _ic, n->new_sock, _mgr));
11                 boost::shared_ptr<handler::multicaster> multi(_multi.lock());
12                 multi->add_handler(network::RECEIVE, _ic, h);
13                 multi->add_handler(network::DELETE, _ic, h);
14                 multi->add_handler(network::DELETE, n->new_sock, h);
15         }
16 }
\end{verbatim}\end{Code}




The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
user\_\-handler/ic\_\-acceptor.h\item 
user\_\-handler/ic\_\-acceptor.cpp\end{CompactItemize}
